leap year in python using function